from pms.common.views import PostFormula
from info.models import Mail
from info.utils.mail import mail_list_view


class API(PostFormula):

    def handle(self, req):
        return self.success_respond({
            'list': mail_list_view(Mail.objects.filter(uid=self.user))
        })
